<?php
	include "sql.php";
	if(is_array($_POST)&&count($_POST)>0){
		$sName = "";
		if ($_SERVER["REQUEST_METHOD"] == "POST"){
		  header("Content-type: text/json");
		  $sName = $_POST["sName"];
		  if($sName!=null) echo getCostByHour($sName);
		  else echo 0;
		  return;
		}
	}
	
?>

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<form action="getCostByHour.php" method="post">
		sName:<input type="text" name="sName"><br>
		<input type="submit" name="">
	</form>
</body>
</html>

